<div id="content-top">
	<h2>Contenidos</h2>
	<a id="topLink" href="#">Change Order</a> 
	<span class="clearFix"> </span>
</div><!-- end of div#content-top -->

<div id="left-col">
 	
 	<?php $this->load->view($template_path ."pages/categories/commons/menu");?>
	
 </div><!-- end of #left-col -->
 
 <div id="mid-col" class="full-col">
 
 	<div class="box">
      <h4 class="white">Contenidos <a class="heading-link" href="<?php echo site_url("admin/nodes/add");?>">Añadir contenido</a></h4>
        <div class="box-container">     		
      	<table class="list">
      		<thead>
      			<tr>
      				<td></td>
      				<td>Id</td>
      				<td>Type</td>
      				<td>Url name</td>
      				<td>Title</td>
      				<td>Created</td>
      				<td>Modified</td>
      				
      				<td>Acciones</td>
      			</tr>
      		</thead>
      		<!-- 
      	<tfoot>
      		<tr>
      			<td class="col-chk"><input type="checkbox"/></td>
      			<td colspan="4"><div class="align-right"><select class="form-select"><option value="option1">Bulk Options</option>
      			<option value="option2">Delete All</option></select>
      			<a class="button" href="#"><span>perform action</span></a></div></td>
      		</tr>
      	</tfoot>
      	-->
      	<tbody>
      	<?php if ($nodes): ?>
			<?php foreach ($nodes as $node): ?>
			<tr>
      			<td class="col-chk"><input type="checkbox"/></td>
      			<td class="col-first--"><?php echo $node->id; ?></td>
      			<td class="col-second"><?php echo $node->type; ?></td>
      			<td class="col-second"><?php echo anchor('admin/nodes/proccess/' . $node->type . "/" . $node->id, $node->url_name); ?></td>
      			<td class="col-second"><?php echo $node->title; ?></td>
      			<td class="col-second"><?php echo $node->created; ?></td>
      			<td class="col-second"><?php echo $node->modified; ?></td>
      			<td class="row-nav">
      				<a class="table-edit-link" href="<?php echo site_url("admin/categories/edit/" . $node->id)?>">Edit</a> <span class="hidden"> | </span> 
      				<a class="table-delete-link" href="<?php echo site_url("admin/categories/delete/" . $node->id)?>" onclick="return confirm('¿Desea eliminar la categoria?')">Delete</a>
      			</td>
      		</tr>
			
			<!-- 
			<tr>
				<td class="admin"><?php echo $node->id; ?></td>
				<td class="admin"><?php echo $node->type; ?></td>
				<td class="admin"><?php echo anchor('admin/nodes/proccess/' . $node->type . "/" . $node->id, $node->url_name); ?> </td>
				<td class="admin"><?php echo $node->title; ?></td>
				<td class="admin"><?php echo $node->created; ?></td>
				<td class="admin"><?php echo $node->modified; ?></td>
	
				<td class="admin">
				<?php echo anchor('admin/nodes/proccess/' . $node->type . "/" . $node->id, '<img src="' . static_url("images/edit.png") .'" title="' . lang('edit') . '" border="0">'); ?> 
	
				<?php echo anchor('admin/nodes/delete/' .$node->type . "/" . $node->id, '<img src="' . static_url("images/delete.png") .'" title="' . lang('delete') . '" border="0">', array ('onClick' => "return confirm('" . lang('delete_confirmation') . "')")); ?>
				<?php echo anchor("/node/" .$node->url_name , '<img src="' . static_url("images/zoom.png") .'" title="Ver" border="0">', "target='_blank'")?>
				</td>
			</tr>
	-->
			<?php endforeach; ?>
	
		<?php else: ?>
			<tr>
			<td colspan="7">No existen contenidos</td>
			</tr>
	
		<?php endif; ?>
      		<?php 
		 	/*			
 			$this->load->helper('generate_list');
			
			$options = array(
				'level'=>0,
				'indent'=>'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|',
				'alternate'=>array('class="odd"', 'class="even"')
			);
			$template = '<option value="{ID}">{INDENT}- {NAME}</option>{SUBS}';
			
			$template = '<tr {ALTERNATE}>'.
      			'<td class="col-chk"><input type="checkbox"/></td>'.
      			'<td class="col-first--">{ID}</td>'.
      			'<td class="col-second">{INDENT}- {NAME}</td>'.
      			'<td class="row-nav">'.
      				'<a class="table-edit-link" href="'.site_url("admin/categories/edit").'/{ID}">Edit</a> <span class="hidden"> | </span>'. 
      				'<a class="table-delete-link" href="'.site_url("admin/categories/delete").'/{ID}" onclick="return confirm(\"¿Desea eliminar la categoria?\");">Delete</a>'.
      			'</td>'.
      		'</tr>{SUBS}';
			
			echo generate_list($categorias, $options, $template); 
			*/
 			?>
 			
      	</tbody>
      </table>  	
      </div><!-- end of div.box-container -->
      </div> <!-- end of div.box -->
 
</div><!-- end of #mid-col --> 